import request from '@/utils/request'

// 查询设备故障记录列表
export function listFaultRecord(query) {
  return request({
    url: '/equipment/faultRecord/list',
    method: 'get',
    params: query
  })
}

// 查询设备故障记录详细
export function getFaultRecord(recordId) {
  return request({
    url: '/equipment/faultRecord/' + recordId,
    method: 'get'
  })
}

// 新增设备故障记录
export function addFaultRecord(data) {
  return request({
    url: '/equipment/faultRecord',
    method: 'post',
    data: data
  })
}

// 修改设备故障记录
export function updateFaultRecord(data) {
  return request({
    url: '/equipment/faultRecord',
    method: 'put',
    data: data
  })
}

// 删除设备故障记录
export function delFaultRecord(recordId) {
  return request({
    url: '/equipment/faultRecord/' + recordId,
    method: 'delete'
  })
}
